package com.iedu.demo.lgq.service;

import com.iedu.demo.lgq.entity.Kuaidi100Delivery;
import com.iedu.demo.lgq.entity.TbOrder;
import com.iedu.demo.lgq.entity.TbOrderItem;
import com.iedu.demo.lgq.entity.TbUserAddress;

import java.util.Date;
import java.util.List;

public interface OrderService {

    // 创建订单
    TbOrder createOrder(String userName, List<TbOrderItem> items, String payment, Integer paymentType, String postFee, String buyerMessage, TbUserAddress userAddress);

    // 商家处理退款
    String processRefund(Integer orderId);

    // 商家发货
    String shipOrder(Integer orderId);


    //商家选择快递运送
    String selectDeliveryCompany(Integer orderId, long deliveryId, String trackingNumber);

    // 根据条件分页查询订单
    List<TbOrder> getOrders(int page, int pageSize, Integer status, Integer userId, Integer orderId);

    // 根据订单ID查询订单详情
    TbOrder getOrderById(Integer orderId);

    // 更新订单状态
    boolean updateOrderStatus(Integer orderId, Integer status);


    int  updateOrderPayment (Integer orderId, Integer status, Date paymentTime);

    // 更新退款状态
    boolean updateRefundStatus(Integer orderId, Integer refundStatus, String refundReason);

    // 批量删除订单
    void deleteOrders(List<String> orderIds);

    // 处理支付请求
    boolean processPayment(Integer orderId);

    //获取所有快递公司
    List<Kuaidi100Delivery> getAllDeliveryCompanies();

    //申请退款
    String applyRefund(Integer orderId, Integer refundStatus, String refundReason);

   // String requestRefund(Integer orderId);

    String getRefundStatus(Integer orderId);
}

